package com.lisa.passjava.question.feign;

import com.lisa.common.es.QuestionEsModel;
import com.lisa.common.utils.R;
import org.mapstruct.Mapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Mapper
@FeignClient("passjava-search")
public interface SearchFeignService {
    // 调用 passjava-search 服务，将数据发送到 ES 中保存。
    @RequestMapping("/search/question/save")
    R saveQuestion(@RequestBody QuestionEsModel questionEsModel);
}
